home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form frmTrain
- Caption = "Train Network"
- ClientHeight = 2040
- ClientLeft = 9192
- ClientTop = 3252
- ClientWidth = 2208
- LinkTopic = "Form1"
- MaxButton = 0 'False
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 2040
- ScaleWidth = 2208
- Begin VB.TextBox txtStepSize
- Height = 285
- Left = 1080
- TabIndex = 5
- Text = "0.2"
- Top = 480
- Width = 855
- End
- Begin VB.TextBox txtFinalMSE
- Height = 285
- Left = 1080
- TabIndex = 3
- Top = 1560
- Width = 855
- End
- Begin VB.CommandButton cmdTrain
- Caption = "Train"
- Height = 375
- Left = 240
- TabIndex = 2
- Top = 960
- Width = 1695
- End
- Begin VB.TextBox txtEpochs
- Height = 285
- Left = 1080
- TabIndex = 0
- Text = "500"
- Top = 120
- Width = 855
- End
- Begin VB.Label lblStepSize
- Caption = "Step Size:"
- Height = 315
- Left = 120
- TabIndex = 6
- Top = 480
- Width = 870
- End
- Begin VB.Label lblFinalMSE
- Caption = "Final MSE:"
- Height = 315
- Left = 120
- TabIndex = 4
- Top = 1560
- Width = 870
- End
- Begin VB.Label lblEpochs
- Caption = "Epochs:"
- Height = 315
- Left = 240
- TabIndex = 1
- Top = 120
- Width = 870
- End
- Attribute VB_Name = "frmTrain"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdTrain_Click()
- Dim NSApp As Object
- Dim NSBB As Object
- Dim mseArray As Variant
- Dim finalMSE As Single
- Dim numberOfEpochs As Integer
-
- Set NSApp = CreateObject("NeuroSolutions.Application")
- Set NSBB = NSApp.activeBreadboard
- NSApp.maximize
- numberOfEpochs = txtEpochs.Text
- NSBB.send "control. setEpochs ( 500 )"
- NSBB.send "control. setEpochs ( " & numberOfEpochs & " )"
- NSBB.send "dataStorage. setBufferLength ( " & numberOfEpochs & " )"
- NSBB.send "dataStorage. setMessageEvery ( " & numberOfEpochs & " )"
-
- NSBB.Select "hidden1SynapseBackpropGradient", False
- NSBB.Select "hidden1AxonBackpropGradient", True
- NSBB.Select "outputSynapseBackpropGradient", True
- NSBB.Select "outputAxonBackpropGradient", True
- NSBB.send "activeSelection. setStepSize ( " & txtStepSize.Text & " )"
- NSBB.send "activeSelection. setMomentumRate ( 0.800000 )"
- NSBB.send "trainingCostProbe. openEngineWindow ( )"
- NSBB.Select "Null", False
- NSBB.send "control. resetNetwork ( )"
- NSBB.send "control. runNetwork ( )"
- mseArray = NSBB.send("dataStorage.getProbeData()")
- finalMSE = mseArray(numberOfEpochs - 1, 0)
- txtFinalMSE.Text = Format(finalMSE, "0.00000")
- End Sub
- Private Sub Label1_Click()
- End Sub
-